package com.zxm.sunshineaiary.util;

import android.text.Html;

/**
 * �����ַ���ɫ
 * 
 * @author Administrator
 * 
 */
public class EditTextColorControl {

	private static EditTextColorControl instance = null;
	private String textColor = "Black";

	public static EditTextColorControl getIntance() {
		if (null == instance) {
			instance = new EditTextColorControl();
		}
		return instance;
	}

	/**
	 * ����������ɫ���ַ���
	 * 
	 * @param text
	 *            �ַ����
	 * @return
	 */
	public CharSequence getColorText(CharSequence text) {
		text = Html.fromHtml("<font color='" + textColor + "'>" + text
				+ "</font>");
		return text;
	}

	/**
	 * ����������ɫ
	 * 
	 * @param strColor
	 */
	public void setTextColor(String strColor) {

		if (strColor.equals("��")) {

			textColor = "Red";

		} else if (strColor.equals("��")) {

			textColor = "Green";

		} else if (strColor.equals("��")) {

			textColor = "Blue";

		}
	}
}
